package Demo2;

public class Test {
    private int x = 10;
    public int area() {
        return x*x;
    }
}

class A {
    public static void main(String[] args) {
        System.out.println(new Test().area());
    }
}


class WashMachine {
    public String brand;//品牌
    public int size;//尺寸
    public String color;//颜色

    //洗衣服功能
    public void washing() {
        System.out.println("洗衣服");
    }

    //甩干功能
    public void spining() {
        System.out.println("甩干");
    }

    //烘干功能
    public void drying() {
        System.out.println("烘干");
    }

    public static void main(String[] args) {
        //实例化一个洗衣机对象
        WashMachine washMachine = new WashMachine();

    }

}